import request from '@/utils/request_search'
const baseURL = '/search'
export default {
  getAllByName(data) {
    return request({
      url: baseURL + '/getPostsCompanyByName',
      method: 'POST',
      data
    })
  },
  saveHistory(data) {
    return request({
      url: baseURL + '/saveHistory',
      method: 'POST',
      data
    })
  },
  getHistory() {
    return request({
      url: baseURL + '/getHistory',
      method: 'GET'
    })
  },
  clearHistory() {
    return request({
      url: baseURL + '/clearHistory',
      method: 'DELETE'
    })
  },
  getSearchContent(city, key) {
    return request({
      url: baseURL + '/getSearchContent',
      method: 'GET',
      params: {
        key,
        city
      }
    })
  }
}
